package com.subalien.client.util;

import com.google.gwt.core.client.GWT;
import com.subalien.client.service.GameService;
import com.subalien.client.service.GameServiceAsync;
import com.subalien.client.service.LoginService;
import com.subalien.client.service.LoginServiceAsync;

public class ServiceSingleton {
	private static LoginServiceAsync loginServiceAsync = null;
	private static GameServiceAsync gameServiceAsync = null;

	public static LoginServiceAsync getLoginServiceAsyncInstance() {
		if (loginServiceAsync == null) {
			loginServiceAsync = (LoginServiceAsync) GWT.create(LoginService.class);
		}

		return loginServiceAsync;
	}
	
	public static GameServiceAsync getGameServiceAsyncInstance() {
		if (gameServiceAsync == null) {
			gameServiceAsync = (GameServiceAsync) GWT.create(GameService.class);
		}

		return gameServiceAsync;
	}
}
